﻿<Window x:Class="Gao.Poker.App.Game.PlayGame"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:app="clr-namespace:Gao.Poker.App.UserControls" Title="比赛详情" WindowStartupLocation="CenterScreen"
        MouseLeftButtonDown="Window_MouseLeftButtonDown" WindowState="Maximized" ResizeMode="NoResize" WindowStyle="None">
    <Window.Background>
        <ImageBrush ImageSource="/skin/bg-right.jpg"/>
    </Window.Background>
    <Grid Margin="0" Name="gameInfo">
        <Grid.RowDefinitions>
            <RowDefinition Height="26"/>
            <RowDefinition Height="90"/>
            <RowDefinition Height="6*"/>
            <RowDefinition Height="4*"/>
            <RowDefinition Height="26"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1.5*"/>
            <ColumnDefinition Width="7*"/>
            <ColumnDefinition Width="1.5*"/>
        </Grid.ColumnDefinitions>
        
        <Border Grid.Column="0" Grid.ColumnSpan="3">
            <Border.Background>
                <ImageBrush ImageSource="/skin/ic_game_top.jpg"/>
            </Border.Background>
        </Border>

        <!--背景换线-->
        <Border Grid.Column="0" Grid.Row="1" Grid.RowSpan="3" BorderThickness="0,0,1,0">
            <Border.BorderBrush>
                <LinearGradientBrush StartPoint="0,1" EndPoint="1,0">
                    <LinearGradientBrush.GradientStops>
                        <GradientStop Color="#00db7118" Offset="0.1"/>
                        <GradientStop Color="#db7118" Offset="0.3"/>
                        <GradientStop Color="#dfd618" Offset=".5"/>
                        <GradientStop Color="#db7118" Offset=".7"/>
                        <GradientStop Color="#00db7118" Offset="0.9"/>
                    </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
            </Border.BorderBrush>
            <Border.Background>
                <ImageBrush ImageSource="/skin/left.jpg"/>
            </Border.Background>
        </Border>

        <Border Grid.Column="1" Grid.Row="1"  Grid.RowSpan="3" BorderThickness="0">
            <Border.Background>
                <ImageBrush ImageSource="/skin/bg_game_middle.png"/>
            </Border.Background>
        </Border>
        <Border Grid.Column="2" Grid.Row="1" Grid.RowSpan="3" BorderThickness="1,0,0,0">
            <Border.Background>
                <ImageBrush ImageSource="/skin/bg_game_right.png"/>
            </Border.Background>
            <Border.BorderBrush>
                <LinearGradientBrush StartPoint="0,1" EndPoint="1,0">
                    <LinearGradientBrush.GradientStops>
                        <GradientStop Color="#00db7118" Offset="0.1"/>
                        <GradientStop Color="#db7118" Offset="0.3"/>
                        <GradientStop Color="#dfd618" Offset=".5"/>
                        <GradientStop Color="#db7118" Offset=".7"/>
                        <GradientStop Color="#00db7118" Offset="0.9"/>
                    </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
            </Border.BorderBrush>
        </Border>

        <Border Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3">
            <Border.Background>
                <ImageBrush ImageSource="/skin/ic_game_bottom.jpg"/>
            </Border.Background>
        </Border>

        <!--数据-->
        <Grid Grid.Column="1" Grid.Row="1" Margin="0" Grid.RowSpan="3">
            <Grid.RowDefinitions>
                <RowDefinition Height="100"/>
                <RowDefinition Height="7*"/>
                <RowDefinition Height="3*"/>
                <RowDefinition Height="50"/>
            </Grid.RowDefinitions>

            <TextBlock Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="60" Text="{Binding Path=Competition.Name}"/>

            <Border Grid.Row="1" BorderThickness="0,1,0,0">
                <Border.BorderBrush>
                    <LinearGradientBrush StartPoint="0,1" EndPoint="1,0">
                        <LinearGradientBrush.GradientStops>
                            <GradientStop Color="#00db7118" Offset="0.1"/>
                            <GradientStop Color="#db7118" Offset="0.3"/>
                            <GradientStop Color="#dfd618" Offset=".5"/>
                            <GradientStop Color="#db7118" Offset=".7"/>
                            <GradientStop Color="#00db7118" Offset="0.9"/>
                        </LinearGradientBrush.GradientStops>
                    </LinearGradientBrush>
                </Border.BorderBrush>
            </Border>

            <Border Grid.Row="1" BorderThickness="0,0,0,2">
                <Border.BorderBrush>
                    <LinearGradientBrush StartPoint="0,1" EndPoint="1,0">
                        <LinearGradientBrush.GradientStops>
                            <GradientStop Color="#00947744" Offset="0.1"/>
                            <GradientStop Color="#947744" Offset="0.2"/>
                            <GradientStop Color="#947744" Offset="0.7"/>
                            <GradientStop Color="#00947744" Offset="0.8"/>
                        </LinearGradientBrush.GradientStops>
                    </LinearGradientBrush>
                </Border.BorderBrush>
            </Border>

            <Border Grid.Row="1" Margin="10">
                <Border.Background>
                    <ImageBrush ImageSource="/skin/game_middle.png" TileMode="None"/>
                </Border.Background>

                <StackPanel Margin="0,10,0,20" Grid.Column="1" Grid.Row="2" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
                    <app:TimerControl x:Name="CurrentLevelTime" TextColor="#FD7D02" Reduce="True"  Margin="0"  Minute="60" TimeFontSize="120"  HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    <TextBlock Name="CurrentLevelDescribe" Foreground="#FD7D02" FontSize="60" Text="Blind " Margin="0" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    <TextBlock Name="CurrentLevelAnte" FontSize="60" Foreground="#FD7D02" Margin="5,1,1,1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                </StackPanel>
            </Border>

            <StackPanel Grid.Row="2" Margin="10" Orientation="Vertical">
                <Image Source="/skin/ic_game_next_level.png" Height="58" Margin="0,0,0,10"/>
                <TextBlock FontSize="40" FontWeight="Bold" Foreground="#FD7D02" Text="{Binding Path=NextCompetitionLevel.Blind}" Margin="5,1,1,1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <TextBlock FontSize="40" FontWeight="Bold" Foreground="#FD7D02" Text="{Binding Path=NextCompetitionLevel.AppendGamble, StringFormat='Ante {0}'}" Margin="5,1,1,1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </StackPanel>

            <Border Name="bdrCaption"  Grid.Row="3" Margin="-1,-1,-1,0" HorizontalAlignment="Center" Background="AliceBlue">
                <TextBlock Name="tbCaption" Width="30" HorizontalAlignment="Right" Margin="0" FontSize="35" Foreground="#FD7D02"/>
            </Border>
            
        </Grid>

        <Grid Grid.RowSpan="5">
            <Grid.RowDefinitions>
                <RowDefinition Height="190"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="100"/>
            </Grid.RowDefinitions>
            <Image Grid.Row="0" Source="/skin/game_logo.png" Margin="2" VerticalAlignment="Top" HorizontalAlignment="Center"/>
            <StackPanel Margin="1" Grid.Row="1" Orientation="Vertical">
                <Image Source="/skin/01.png" Height="30"/>
                <ListView Name="listView" Margin="10,0,0,0" Background="{Binding null}"
                      ItemsSource="{Binding Path=BonusCalculations}" Padding="0" BorderThickness="0"
                      VirtualizingStackPanel.VirtualizationMode="Recycling">
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <Grid Margin="2">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="10" />
                                    <ColumnDefinition Width="60" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Image Grid.Column="0" Source="/skin/bg_game_point.png" Width="7" Height="7" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                <TextBlock Margin="5" FontSize="20" Foreground="#FD7D02" Grid.Column="1" Text="{Binding Path=Rank}" HorizontalAlignment="Center"/>
                                <TextBlock Margin="20,5,5,5" Foreground="#FD7D02" FontSize="20" Grid.Column="2" Text="{Binding Path=Bouns}" HorizontalAlignment="Right"/>
                            </Grid>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>
            </StackPanel>

            <StackPanel Margin="0" Grid.Row="2" Orientation="Vertical">
                <Image Source="/skin/02.png" Height="30"/>
                <StackPanel Orientation="Horizontal" Margin="10,2,2,2">
                    <TextBlock Margin="10,2,2,2" FontSize="30" FontWeight="Bold" Foreground="#FD7D02" Text="{Binding Path=TotalBet}"/>
                </StackPanel>
            </StackPanel>
        </Grid>

        <Grid Grid.Column="2" Grid.Row="1" Grid.RowSpan="3" Margin="0,0,0,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="1.6*"/>
                <RowDefinition Height="1.6*"/>
                <RowDefinition Height="1.6*"/>
                <RowDefinition Height="1.6*"/>
                <RowDefinition Height="1.6*"/>
                <RowDefinition Height="1.6*"/>
                <RowDefinition Height="1.6*"/>
            </Grid.RowDefinitions>

            <StackPanel Margin="5,20,0,0" Grid.Row="0" Orientation="Vertical" HorizontalAlignment="Center">
                <Image Source="/skin/ic_game_next_break.png" Height="42"/>
                <app:TimerControl x:Name="NextBreakTime" TextColor="#FD7D02" Reduce="True"  Margin="0"  Minute="60" TimeFontSize="24"  HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <Border BorderThickness="1">
                    <Border.BorderBrush>
                        <LinearGradientBrush StartPoint="0,1" EndPoint="1,0">
                            <LinearGradientBrush.GradientStops>
                                <GradientStop Color="#00947744" Offset="0.1"/>
                                <GradientStop Color="#947744" Offset="0.3"/>
                                <GradientStop Color="#947744" Offset=".7"/>
                                <GradientStop Color="#00947744" Offset="0.9"/>
                            </LinearGradientBrush.GradientStops>
                        </LinearGradientBrush>
                    </Border.BorderBrush>
                </Border>
            </StackPanel>

            <StackPanel Margin="5,0,0,0" Grid.Row="1" Orientation="Vertical">
                <Image Source="/skin/ic_game_total_tack.png" Height="42" HorizontalAlignment="Center"/>
                <TextBlock FontSize="24" Margin="5" Foreground="#FD7D02" FontWeight="Bold" Text="{Binding Path=Competition.TotalBet}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <Border BorderThickness="1">
                    <Border.BorderBrush>
                        <LinearGradientBrush StartPoint="0,1" EndPoint="1,0">
                            <LinearGradientBrush.GradientStops>
                                <GradientStop Color="#00947744" Offset="0.1"/>
                                <GradientStop Color="#947744" Offset="0.3"/>
                                <GradientStop Color="#947744" Offset=".7"/>
                                <GradientStop Color="#00947744" Offset="0.9"/>
                            </LinearGradientBrush.GradientStops>
                        </LinearGradientBrush>
                    </Border.BorderBrush>
                </Border>
            </StackPanel>

            <StackPanel Margin="5,0,0,0" Grid.Row="2" Orientation="Vertical">
                <Image Source="/skin/ic_game_average_stack.png" Height="42" HorizontalAlignment="Center"/>
                <TextBlock FontSize="24" Margin="5" Foreground="#FD7D02" FontWeight="Bold" Text="{Binding Path=GameAverageStack}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <Border BorderThickness="1">
                    <Border.BorderBrush>
                        <LinearGradientBrush StartPoint="0,1" EndPoint="1,0">
                            <LinearGradientBrush.GradientStops>
                                <GradientStop Color="#00947744" Offset="0.1"/>
                                <GradientStop Color="#947744" Offset="0.3"/>
                                <GradientStop Color="#947744" Offset=".7"/>
                                <GradientStop Color="#00947744" Offset="0.9"/>
                            </LinearGradientBrush.GradientStops>
                        </LinearGradientBrush>
                    </Border.BorderBrush>
                </Border>
            </StackPanel>

            <StackPanel Margin="5,0,0,0" Grid.Row="3" Orientation="Vertical">
                <Image Source="/skin/ic_game_list_people.png" Height="42" HorizontalAlignment="Center"/>
                <TextBlock FontSize="24" Margin="5" Foreground="#FD7D02" FontWeight="Bold" Text="{Binding Path=TotalGamePerson}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                <Border BorderThickness="1">
                    <Border.BorderBrush>
                        <LinearGradientBrush StartPoint="0,1" EndPoint="1,0">
                            <LinearGradientBrush.GradientStops>
                                <GradientStop Color="#00947744" Offset="0.1"/>
                                <GradientStop Color="#947744" Offset="0.3"/>
                                <GradientStop Color="#947744" Offset=".7"/>
                                <GradientStop Color="#00947744" Offset="0.9"/>
                            </LinearGradientBrush.GradientStops>
                        </LinearGradientBrush>
                    </Border.BorderBrush>
                </Border>
            </StackPanel>

            <StackPanel Margin="5,0,0,0" Grid.Row="4" Orientation="Vertical">
                <Image Source="/skin/ic_game_entry.png" Height="20" HorizontalAlignment="Left"/>
                <TextBlock FontSize="24" Margin="5,5,20,5" Foreground="#FD7D02" FontWeight="Bold" Text="{Binding Path=Competition.BuyNumber}" HorizontalAlignment="Right"  VerticalAlignment="Center"/>
            </StackPanel>

            <StackPanel Margin="5,0,0,0" Grid.Row="5" Orientation="Vertical">
                <Image Source="/skin/ic_game_rebuy.png" Height="20" HorizontalAlignment="Left"/>
                <TextBlock FontSize="24" Margin="5,5,20,5" Foreground="#FD7D02" FontWeight="Bold" Text="{Binding Path=Competition.BuyAgainNumber}" HorizontalAlignment="Right" VerticalAlignment="Center"/>
            </StackPanel>
            
            <StackPanel Margin="5,0,0,0" Grid.Row="6" Orientation="Vertical">
                <Image Source="/skin/ic_game_addon.png" Height="20" HorizontalAlignment="Left"/>
                <TextBlock FontSize="24" Margin="5,5,20,5" Foreground="#FD7D02" FontWeight="Bold" Text="{Binding Path=Competition.BuyLastNumber}" HorizontalAlignment="Right" VerticalAlignment="Center"/>
            </StackPanel>
        </Grid>

        <StackPanel Grid.Column="2" HorizontalAlignment="Right" Orientation="Horizontal">
            <Button Content="max" HorizontalAlignment="Right" Style="{DynamicResource MaxButtonStyle}" Width="41.5" Name="maxButton" Click="maxButton_Click">
                <Button.Background>
                    <ImageBrush ImageSource="/skin/Button/MAX.png" Stretch="Uniform"/>
                </Button.Background>
            </Button>
            <Button Content="x" HorizontalAlignment="Right" Style="{DynamicResource SysButtonStyle}" Width="44.315" Name="closeButton" Click="closeButton_Click" />
        </StackPanel>

        <Grid Name="shade"  Grid.Column="1" Grid.Row="2" Grid.RowSpan="2" Background="#EEEEEEEE" Visibility="Visible">
            <Grid.RowDefinitions>
                <RowDefinition Height="5*"/>
                <RowDefinition Height="5*"/>
            </Grid.RowDefinitions>
            <TextBlock Name="shadeInfo" HorizontalAlignment="Center" VerticalAlignment="Bottom" Foreground="#FD7D02" FontWeight="Bold" Text="比赛暂停" FontSize="100"/>
            <app:TimerControl x:Name="RestTime" Grid.Row="1" TextColor="#FD7D02" Reduce="True"  Margin="0"  Minute="60" TimeFontSize="100"  HorizontalAlignment="Center" VerticalAlignment="Top"/>
        </Grid>
    </Grid>
</Window>
